/*
 *    Copyright (c) 2018-2025, boss All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *
 * Redistributions of source code must retain the above copyright notice,
 * this list of conditions and the following disclaimer.
 * Redistributions in binary form must reproduce the above copyright
 * notice, this list of conditions and the following disclaimer in the
 * documentation and/or other materials provided with the distribution.
 * Neither the name of the boss developer nor the names of its
 * contributors may be used to endorse or promote products derived from
 * this software without specific prior written permission.
 * Author: boss
 */

package com.hopes.bizz.stop.risk.data.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.hopes.bizz.stop.common.constant.enums.ParkStopModDictEnum;
import com.hopes.boss.admin.api.resolver.DictResolver;
import com.hopes.boss.common.entity.BaseLogicEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * 实时监控数据历史
 *
 * @author pig
 * @date 2024-02-22 11:20:58
 */
@Data
@TableName("line_om_rt_data_his")
@EqualsAndHashCode(callSuper = true)
@Schema(description = "实时监控数据历史")
public class LineOmRtDataHisEntity extends BaseLogicEntity {

    private static final long serialVersionUID = 1L;


	/**
	* id
	*/
    @Schema(description="id")
    private Long id;

	/**
	* 监测类别 1.废气 2.废水 3.VOCs
	*/
    @Schema(description="监测类别 1.废气 2.废水 3.VOCs")
    private Integer monitorType;

	/**
	* 运维单位
	*/
    @Schema(description="运维单位")
    private Long operationId;

	/**
	* 监控点
	*/
    @Schema(description="监控点")
    private Long monitorSiteId;

	/**
	* 因子
	*/
    @Schema(description="因子")
    private Long factorId;

	/**
	* 因子编码
	*/
    @Schema(description="因子编码")
    private String factorCode;

	/**
	* 采样数据
	*/
    @Schema(description="采样数据")
    private BigDecimal rtd;

	/**
	* 采样折算数据
	*/
    @Schema(description="采样折算数据")
    private BigDecimal zsRtd;

	/**
	* 数据时间
	*/
    @Schema(description="数据时间")
    private LocalDateTime dataTime;

	/**
	* 数据标记 见 212协议
	*/
    @Schema(description="数据标记 见 212协议")
    private String flag;

	/**
	* 是否超标
	*/
    @Schema(description="是否超标")
    private String isExcess;

	/**
	* 数据状态 1.正常 2.需修约 3.无效数据
	*/
    @Schema(description="数据状态 1.正常 2.需修约 3.无效数据")
    private Integer dataSataus;

	/**
	* 最大报警值
	*/
    @Schema(description="最大报警值")
    private BigDecimal maxAlarm;

	/**
	* 最小报警值
	*/
    @Schema(description="最小报警值")
    private BigDecimal minAlarm;

	/**
	* 计量单位
	*/
    @Schema(description="计量单位")
    private String unit;

	/**
	* 机构ID
	*/
    @Schema(description="机构ID")
    private Long orgId;


	public String getFactorIdStr(){
		return DictResolver.getItemLabelByValue(ParkStopModDictEnum.factor_name,this.factorId);

	}

}
